<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  


<sec:authorize access="hasRole('ROLE_ROOT')">
	<c:set var="seq_no" scope="page">
		<sec:authentication property="principal.users.seq_no" />
	</c:set>
	
	<c:if test="${seq_no == 1}">
		<jsp:forward page="/admin/page/user/add.htm" />
	</c:if>
	<c:if test="${seq_no != 1}">
		<jsp:forward page="/admin/page/formview.htm" />
	</c:if>
	
</sec:authorize>

<sec:authorize access="hasRole('ROLE_KEYR')">
  <jsp:forward page="/form/page/input.htm" />
</sec:authorize>

<sec:authorize access="hasRole('ROLE_INTR')">
	角色尚未開放&nbsp;<a href="${appPath}/j_spring_security_logout">返回首頁</a>
</sec:authorize>